<%-- 
    Document   : orderInfo
    Created on : 2015-6-28, 21:18:33
    Author     : MY
--%>

<%@page import="bookstore.model.Good"%>
<%@page import="java.util.List"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>结算页</title>
        <link rel="stylesheet" href="/iBook/css/all.css" type="text/css"/>
        <link rel="stylesheet" href="/iBook/css/bootstrap.min.css" type="text/css"/>
        <style>
            #picture {
                float:left;
            }
            #picture-text{
                padding-left: 15px;
                float:left;
            }
        </style>
    </head>
    <body>
        <%
            String total = request.getParameter("total");
        %>
        <jsp:include  page="/common/top.jsp"/>
        <form action="/iBook/OrderInfoAction" method="get">
            <input type="hidden" name="method" value="manage">
            <input type="hidden" name="total" value="<%=total%>">
            <table class="table table-bordered" style="width: 800px;height:800px; margin-left: 300px ">
                <th>
                <p><Big>RecieverInfo</Big></p>
                <div>
                    <div class="form-group" style="float: left">
                        <label for="exampleInputReciever">Reciever</label>
                        <input type="text" class="form-control" id="exampleInputReciever" placeholder="Reciever required" name="reciever" style="width: 200px" required>
                    </div>  
                    <div class="form-group" style=" margin-left: 250px">
                        <label for="exampleInputPhone">Phone</label>
                        <input type="text" class="form-control" id="exampleInputReciever" placeholder="Phone required" name="phone" style="width: 200px" required> 
                    </div>
                </div>
                <div class="form-group">
                    <label for="exampleInputAddress">Address</label>
                    <input type="text" class="form-control" id="exampleInputReciever" placeholder="Address required" name="address" style="width: 500px" required> 
                </div>
                <div>
                    <div class="form-group" style="float:left">
                    <label for="exampleInputEmail1">Email address</label>
                    <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email" name="email" style="width: 300px" >
                </div>
                    <div class="form-group" style="margin-left: 350px">
                        <label for="exampleInputZipcode">Zipcode</label>
                        <input type="text" class="form-control" id="exampleInputReciever" placeholder="Zipcode required" name="zipcode" style="width: 200px" required>
                    </div>
                </div>
                
               
                <hr/>
                <p><Big>PayWay</Big></p>
                <div>
                    <div class="radio"  style="float: left">
                        <label>
                            <input type="radio" name="payWay" id="optionsRadios1" value="在线支付" checked>
                            <a  class="btn btn-danger btn-primary btn-sm" >在线支付</a> 
                        </label>
                    </div>
                    <div class="radio" style="top:9px; left: 30px" >
                        <label>
                            <input type="radio" name="payWay" id="optionsRadios2" value="货到付款" >
                            <a  class="btn btn-danger btn-primary btn-sm" >货到付款</a>
                        </label>
                    </div>
                </div>
                <hr/>
                <p><Big>OrderList</Big></p>
                <div class="radio"  >
                    <label>
                        <input type="radio" name="sendWay" id="optionsRadios1" value="快递运输" checked>
                        <a  class="btn btn-danger btn-primary btn-sm" >快递运输</a> 
                    </label>
                </div>
        <div class="form-group">
                    <label for="exampleInputOrderState">OrderState</label>
                    <input type="text" class="form-control" id="exampleInputOrderState" placeholder="OrderState required" name="orderState" style="width: 300px" required>
                </div>
                <table class="table table-hover table-striped">
                    <tr ><th style="width: 800px">商品信息</th><th>单价（元）</th><th>数量</th><th>金额</th></tr>
                            <%
                                List<Good> goodList = (List<Good>) session.getAttribute("goodList");
                                Good good = null;
                                if (goodList != null) {
                                    for (int i = 0; i < goodList.size(); ++i) {
                                        good = goodList.get(i);
                                       
                            %>
                    <tr>
                        <td><div>                
                                <div id="picture">
                                    <img src="/iBook/bookimages/<%=good.getBook().getPicture()%>"  height="80" width="60" class="img-thumbnail">
                                </div>   
                                <a href="#"><div id="picture-text"><strong><%=good.getBook().getName()%></strong></div></a>
                            </div>
                        </td>
                        <td><%=good.getBook().getPrice()%></td>
                        <td><%=good.getCount()%></td>
                        <td id="total"><%=good.getTotal()%></td>

                    </tr>
                    <%}
                    }%>
                </table>
                </th>
            </table>
            <nav class="navbar navbar-default navbar-fixed-bottom">
                <div class="container">
                    <div class="container-fluid">
                        <div class="row" >
                            <div class="col-md-10">
                                <h2 style="float: right">合计：<span style="color: #cc0000"><%=total%></span>(元)</h2>
                            </div>
                            <div class=" col-md-2" style=" margin-top: 10px">
                                <button  type="submit"class="btn btn-danger btn-primary btn-lg" onclick=>提交订单</button>
                            </div>
                        </div>
                    </div>
                </div>
            </nav>
        </form>
        <jsp:include  page="/common/bottom.jsp"/>
    </body>
</html>
